import bus from '@/bus'
import { renderButton } from '@/util'
let data = {
  status: 'pass',
  totalItem: 1,
  pageSize: window.$pageSize,
  currentPage: 1,
  form: {
    auditStatus: 0
  },
  columns: [
    {
      type: 'selection',
      width: 60,
      align: 'left',
      fixed: 'left'
    }, {
      title: '所在区域',
      key: 'address',
      align: 'left',
      minWidth: 250,
      tooltip: true
    }, {
      title: '门店名称',
      key: 'storeName',
      align: 'left',
      minWidth: 200,
      tooltip: true
    }, {
      title: '门头编号',
      key: 'storeNo',
      align: 'left',
      minWidth: 180
    }, {
      title: '门店类型',
      key: 'storeTypeStr',
      align: 'left',
      minWidth: 120
    }, {
      title: '联系人姓名',
      key: 'ownerName',
      align: 'left',
      minWidth: 120
    }, {
      title: '经销商',
      key: 'distributorName',
      align: 'left',
      minWidth: 200,
      tooltip: true
    }, {
      title: '发起人',
      key: 'applyOperator',
      align: 'left',
      minWidth: 120
    }, {
      title: '类型',
      key: 'applyTypeStr',
      align: 'left',
      minWidth: 150
    }, {
      title: '门店来源',
      key: 'signSourceStr',
      align: 'left',
      minWidth: 100
    }, {
      title: '审核状态',
      key: 'auditStatus',
      align: 'left',
      minWidth: 120,
      render: (h, p) => {
        let list = {
          0: '待审核',
          1: '审核中',
          2: '审核未通过',
          3: '审核通过'
        }
        return <div>{list[p.row.auditStatus]}</div>
      }
    }, {
      title: '操作',
      align: 'right',
      minWidth: 150,
      fixed: 'right',
      render: (h, params) => {
        return (
          <div>
            {renderButton(h, { text: '查看', type: 'primary' }, () => { bus.$emit('infoRow', params.row) })}
            {renderButton(h, { text: '审核', type: 'warning', disabled: !params.row.canAudit }, () => { bus.$emit('checkRow', params.row) }) }
          </div>
        )
      }
    }],
  data: [{}]
}
export default data
